#pragma once
#include "common.h"
#include "BoardManager.h"

class CRoomManager
{
private:
	static CRoomManager* m_Instance;
	map<jint, CBoardManager*> m_mBoard;
	map<jint, int> m_mCntUser;

	CRoomManager(void);
	virtual ~CRoomManager(void);

public:
	static CRoomManager* getInstance(void);
	static void createInstance(void);
	static void destroy(void);

	void initialize(void);

	bool createRoom(jint roomId);
	bool destroyRoom(jint roomId);
	void enterUser(jint roomId);

	void initializeRoom(jint roomId);
	void RoomGame(jint roomId, PLAYER whoseturn, int index);
};
